package com.anti.modular.owner.ownerleasebilldetail.service;

import com.anti.jdbc.support.page.PageParam;
import com.anti.jdbc.support.page.PageResult;
import com.anti.modular.owner.ownerleasebilldetail.entity.OwnerLeaseBillDetail;
import com.anti.modular.owner.ownerleasebilldetail.param.OwnerLeaseBillDetailParam;
import com.anti.modular.owner.ownerleasefees.entity.OwnerLeaseFees;

import java.math.BigDecimal;
import java.util.List;

/**
 * 業主賬單明細service接口
 *
 * @author anti
 * @date 2021-05-20 14:26:44
 */
public interface OwnerLeaseBillDetailService{

    /**
    * 根据主键查询实体
    */
    OwnerLeaseBillDetail getById(OwnerLeaseBillDetailParam ownerLeaseBillDetailParam);

    BigDecimal getAmountByBillId(Long billId);

    /**
     * 查询業主賬單明細
     *
     * @author anti
     * @date 2021-05-20 14:26:44
     */
    PageResult page(PageParam pageParam,OwnerLeaseBillDetailParam ownerLeaseBillDetailParam);

    /**
     * 業主賬單明細列表
     *
     * @author anti
     * @date 2021-05-20 14:26:44
     */
    List<OwnerLeaseBillDetail> list(OwnerLeaseBillDetailParam ownerLeaseBillDetailParam);

    List<OwnerLeaseBillDetail> getListByBillIdForRead(Long billId);

    /**
     *
     * @param billId
     * @param type 1 不修改   2臨時支出 3 臨時收入
     * @return
     */
    List<OwnerLeaseBillDetail> getListByBillIdForEditByType(Long billId,int type);

    /**
     * 添加業主賬單明細
     *
     * @author anti
     * @date 2021-05-20 14:26:44
     */
    void add(OwnerLeaseBillDetailParam ownerLeaseBillDetailParam);

    /**
     * 新增固定費用
     * @param ownerLeaseFees
     * @param billId
     */
    void addGdfy(List<OwnerLeaseFees> ownerLeaseFees,Long billId);

    void addGdfyByType(List<OwnerLeaseBillDetail> ownerLeaseFees,Long billId,int type);

    /**
     * 新增押金
     * @param deposit
     * @param billId
     */
    void addYj(BigDecimal deposit,Long billId,int type);

    /**
     * 新增租金
     * @param deposit
     * @param billId
     */
    void addZj(BigDecimal deposit,Long billId);

    /**
     * 删除業主賬單明細
     *
     * @author anti
     * @date 2021-05-20 14:26:44
     */
    void delete(OwnerLeaseBillDetailParam ownerLeaseBillDetailParam);

    void deleteByOwnerBillId(Long ownerBillId);

    void deleteXuByOwnerBillId(Long ownerBillId);

    /**
     *
     * @param ownerBillId
     * @param type  4 临时支出 5 临时收入
     */
    void deleteByOwnerBillIdOnType(Long ownerBillId,int type);

    /**
     * 编辑業主賬單明細
     *
     * @author anti
     * @date 2021-05-20 14:26:44
     */
    void edit(OwnerLeaseBillDetailParam ownerLeaseBillDetailParam);

    /**
     * 清算賬單修改費用詳情
     * @param yjList
     */
    void editQsFy(List<OwnerLeaseBillDetail> yjList);

    /**
     * 查看業主賬單明細
     *
     * @author anti
     * @date 2021-05-20 14:26:44
     */
     OwnerLeaseBillDetail detail(OwnerLeaseBillDetailParam ownerLeaseBillDetailParam);

}
